package com.xiuxia.usercenterbackend.common;

import lombok.Getter;

/**
 * @ClassName ResponseCode
 * @Author CHENBO
 * @Date 2024/12/17 10:12
 */
@Getter
public enum ResponseCode {
    /**
     * 成功
     */
    SUCCESS(200, "success"),
    /**
     * 参数错误
     */
    PARAM_ERROR(400, "参数错误"),
    /**
     * 无权限
     */
    NO_PERMISSION(403, "无权限"),
    /**
     * 用户不存在
     */
    USER_NOT_FOUND(404, "用户不存在"),
    /**
     * 服务器内部错误
     */
    INTERNAL_ERROR(500, "服务器内部错误");

    private final int code;
    private final String message;

    ResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
